#ifndef MESSAGECONTROL_H
#define MESSAGECONTROL_H

#include <QDialog>
#include <QMouseEvent>

namespace Ui {
class MessageControl;
}

class MessageControl : public QDialog
{
    Q_OBJECT

public:
    explicit MessageControl(QWidget *parent = nullptr);
    ~MessageControl();

signals:
    void clearAlarm();
    void clearMessage();
    void exportAlarm();
    void exportMessage();
    void messageTypeChanged(const QString &type);
    void messageFiltersChanged(const QStringList &filters);

protected:
    void mousePressEvent(QMouseEvent *event) override;
    void mouseMoveEvent(QMouseEvent *event) override;
    void mouseReleaseEvent(QMouseEvent *event) override;

private slots:
    void on_pushButton_clicked();
    void on_pushButton_2_clicked();
    void on_pushButton_3_clicked();
    void on_pushButton_4_clicked();

    void on_checkBox_stateChanged(int state);
    void on_checkBox_2_stateChanged(int state);
    void on_checkBox_3_stateChanged(int state);
    void updateMessageFilter();

private:
    Ui::MessageControl *ui;
    bool m_mousePressed = false;
    QPoint m_dragPos;
};

#endif // MESSAGECONTROL_H
